package com.report.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.report.dto.request.OrderReq;
import com.report.dto.response.OrderRes;
import com.report.service.IOrderService;
import com.zmh.framework.util.Result;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author summer
 * @since 2024/06/27 19:48:57
 */
@RestController
@RequestMapping("/order")
@AllArgsConstructor
public class OrderController {

    private final IOrderService orderService;

     @PostMapping(value = "/lists")
     public Result<Page<OrderRes>> findLists(@RequestBody OrderReq orderReq){

         return Result.successResult(orderService.lists(orderReq));
     }

}
